home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1994 October / Macformat17.cdr / Shareware City / Developers / GAL ƒ / GAL examples / switch em < prev    next >
Text File  |  1994-07-11  |  283b  |  15 lines

  1. ; switches the contents of two memory locations
  2. ; the change should be visable
  3. ; running a second time reverses again
  4.     begin_code
  5.     copy    first=>reg0
  6.     copy    second=>reg1
  7.     copy    reg0=>second
  8.     copy    reg1=>first
  9.     halt
  10.     end_code
  11.     begin_data
  12. first        constant -1
  13. second    constant 1
  14.     end_data
  15.     end